<?php

namespace app\model\sync_model;

use app\BaseModel;
use app\common\Message;
use think\model\relation\BelongsTo;

class SyncOperlog extends BaseModel
{
    use Message;
    protected $name = 'sync_operlog';

    /**
     * 关联同步用户-获取同步过来的姓名
     * @return BelongsTo
     */
    public function getUserName(): BelongsTo
    {
        return $this->belongsTo(SyncUser::class, 'uid')->bind(['nickname']);
    }
}